﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterCarInsurance.master" AutoEventWireup="true"
    CodeFile="quote-results.aspx.cs" Async="true" Inherits="car_insurance_quote_results" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/controls/usrNoJS.ascx" TagName="usrNoJS" TagPrefix="ucNoJS" %>
<%@ Register Src="~/controls/usrIdNumber.ascx" TagName="usrIdNumber" TagPrefix="uc2" %>
<%@ Register Src="~/controls/usrCarDriverDetails.ascx" TagName="usrCarDriver" TagPrefix="uc4" %>
<%@ Register Src="~/controls/usrMobilePhone.ascx" TagName="usrPhoneNo" TagPrefix="uc10" %>
<%@ Register Src="~/controls/usrOccupation.ascx" TagName="usrOccupation" TagPrefix="uc5" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <!-- Removed on 02 May 2013
    <asp:Literal runat="server" ID="litZopim" Visible="false"> <script type="text/javascript">
                                                                   window.$zopim || (function(d, s) { var z = $zopim = function(c) { z._.push(c) }, $ = z.s = d.createElement(s), e = d.getElementsByTagName(s)[0]; z.set = function(o) { z.set._.push(o) }; z._ = []; z.set._ = []; $.async = !0; $.setAttribute('charset', 'utf-8'); $.src = '//cdn.zopim.com/?13PP2NTdJwR5x1J6LoirXDwV24QRLFR5'; z.t = +new Date; $.type = 'text/javascript'; e.parentNode.insertBefore($, e) })(document, 'script');
        </script></asp:Literal> -->
    <!-- Add jQuery library -->

    <script type="text/javascript" src="/includes/fancybox/lib/jquery-1.7.2.min.js"></script>

    <!-- Add fancyBox main JS and CSS files -->

    <script type="text/javascript" src="/includes/fancybox/source/jquery.fancybox.js?v=2.0.6"></script>

    <!-- Add Message -->

    <script src="/controls/CE_Date.js" type="text/javascript"></script>

    <link href="/css/popup_login.css" rel="stylesheet" type="text/css" />
    <!-- hide fancybox media="screen" -->
    <link rel="stylesheet" type="text/css" href="/includes/fancybox/source/jquery.fancybox.css?v=2.0.6"
        media="screen" />

    <script type="text/javascript">
        $(document).ready(function() {
            //$(".fancybox").fancybox();
            $("#ctl00_cpBody_hidden_link").fancybox({
                'width': 788,
                'height': 470,
                'autoScale': false,
                'padding': '0',
                'transitionIn': 'none',
                'transitionOut': 'none',
                'type': 'iframe'
            });

        });
    </script>

    <script type="text/javascript">
        $(document).ready(function() {
            //$('.fancybox').fancybox();
            $(".fancybox").fancybox({
                'width': 788,
                'height': 470,
                'autoScale': false,
                'padding': '0',
                'transitionIn': 'none',
                'transitionOut': 'none',
                'type': 'iframe'
            });

        });
    </script>

    <style type="text/css">
        .fancybox-custom .fancybox-skin
        {
            box-shadow: 0 0 50px #222;
        }
    </style>
    <link rel="stylesheet" type="text/css" href="/css/extra.css" />
    <link rel="stylesheet" type="text/css" href="/css/moreinfo.css" />
    <link rel="stylesheet" type="text/css" href="/css/callme.css" />
    <link rel="stylesheet" type="text/css" href="/css/pathbar.css" />
    <link rel="stylesheet" type="text/css" href="/css/results-a.css" />

    <script type="text/javascript" src="/includes/jtip.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpHeader" runat="Server">
   
    <!-- Google Code for Results Page Conversion Page -->
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpBody" runat="Server">

    <script src="/controls/IdNumber.js" type="text/javascript"></script>

    <div>
        <div class="body">
            <asp:HiddenField ID="hidReloadKawnaFlag" runat="server" />
            <div class="topbar">
            </div>
            <div class="body">
                <div class="padding_lr15px">
                    <ucNoJS:usrNoJS ID="usrNoJS1" runat="server" />
                    <!-- Column Content | Start -->
                    <div class="col_content_full">
                        <div class="topcol">
                        </div>
                        <div class="body">
                            <div>
                                <ul id="stp_menu">
                                    <li class="stp1_r"><a id="hplStep1"><span class="active_r">
                                        <%=GetGlobalResourceObject("Menu", "StepGetQuote")%></span></a></li>
                                    <li class="stp2_r"><a id="hplStep2"><span class="active_r">
                                        <%=GetGlobalResourceObject("Menu", "StepQuoteResults")%></span></a></li>
                                    <li class="stp3"><a id="hplStep3"><span class="stp_r">
                                        <%=GetGlobalResourceObject("Menu", "StepBuyOnline")%></span></a></li>
                                </ul>
                            </div>
                            <div class="form_selection" id="divFormSelection" style="display: none" runat="server">
                                <h3>
                                    <asp:Label ID="lblProvider" runat="server"></asp:Label></h3>
                                <div class="selection_wrap">
                                    <span class="fs_lbl">
                                        <asp:Label runat="server" ID="LabelInsType" Text="<%$Resources:CarInsurance,InsuranceType%>" />
                                        : </span>
                                    <asp:Label ID="lblInsuranceType" class="fs_lbl_m" runat="server" /><!--1</span>-->
                                    <span class="fs_lbl_r">
                                        <asp:Label runat="server" ID="Label3" Text="<%$Resources:CarInsurance,CarMakeModel%>" />
                                        : </span>
                                    <asp:Label ID="lblCarMakemodelTop" class="fs_lbl_m" runat="server" /><!--MERCEDES BENZ 190E</span>-->
                                    <span class="fs_lbl_r">
                                        <asp:Label runat="server" ID="Label2" Text="<%$Resources:CarInsurance,CarModelYear%>" />
                                        : </span>
                                    <asp:Label ID="lblYrofManTop" class="fs_lbl_m" runat="server" /><!--2009</span>-->
                                    <span class="fs_lbl_r">
                                        <asp:Label runat="server" ID="Label1" Text="<%$Resources:CarInsurance,NCB%>" Visible="false" />
                                    </span>
                                    <asp:Label ID="lblNCBvalueTop" class="fs_lbl_m" runat="server" Visible="false" /><!--10</span>-->

                                </div>
                            </div>
                            <div id="contentBody_full">
                                <div style="text-align: left; display: none;">
                                    <ul id="stp_menu_old">
                                        <li class="stp1_r">
                                            <asp:HyperLink ID="hplCarDetails" NavigateUrl="default.aspx" runat="server">
                                                <span class="stp_r_g">
                                                    <asp:Label runat="server" ID="lblCarInsuranceDetails" Text="<%$Resources:CarInsurance,CarInsuranceDetails %>" /></span></asp:HyperLink></li>
                                        <li class="stp2_r">
                                            <asp:HyperLink ID="hplProfile" NavigateUrl="profile.aspx" runat="server">
                                                <span class="stp_r_g">
                                                    <asp:Label runat="server" ID="lblProfile" Text="<%$Resources:CarInsurance,Profile %>" /></span></asp:HyperLink></li>
                                        <li class="stp3_r">
                                            <asp:HyperLink ID="hplCarResults" NavigateUrl="#" runat="server">
                                                <span class="active_r">
                                                    <asp:Label runat="server" ID="lblQuoteResults" Text="<%$Resources:CarInsurance,QuoteResults %>" /></span></asp:HyperLink></li>
                                    </ul>
                                </div>
                                <div class="section">
                                    <fieldset>
                                        <div id="divSummaryBox" runat="server">
                                         
                                            <div class="vrow">
                                                <div class="twelve columns">
                                                    <div class="three columns button_quote_summary" style="width:150">
                                                        <%=GetGlobalResourceObject("CarInsurance", "QuoteSummary")%></div>
                                                    <div class="two columns right_border">
                                                        <div class="nine columns tx_quote_top_b">
                                                            <%=GetGlobalResourceObject("CarInsurance", "CarModelYear")%></div>
                                                        <div class="three columns tx_quote_top_s">
                                                            <asp:Label ID="lblYrofManufacture" runat="server"></asp:Label></div>
                                                    </div>
                                                    <div class="five columns">
                                                        <div class="four columns tx_quote_top_b">
                                                            <%= GetGlobalResourceObject("CarInsurance", "CarMakeModel")%></div>
                                                        <div class="eight columns tx_quote_top_s">
                                                            <asp:Label ID="lblCarMakemodel" runat="server"></asp:Label></div>
                                                    </div>
                                                    <div style="float: right; padding-right: 5px">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </fieldset>
                                    <div class="clear">
                                    </div>

                                    <a id="hidden_link" href="" runat="server"></a>
                                    <asp:Literal ID="LiteralLink" runat="server"></asp:Literal>
                                    <div style="float: left; display: none">
                                        <asp:ImageButton ID="ibtRunNewQuote" runat="server" ImageUrl="<%$Resources:ImageResource,ViewEditAssumption%>"
                                            AlternateText="Run New Quotes" ToolTip="Run New Quotes" OnClientClick="return false;" />
                                    </div>
                                    <div class="clear">
                                    </div>
                                    <div class="divhalf1">
                                        <div class="mainContainer">
                                            <div class="leftcolContainer">
                                                <!-- Form | Start -->
                                                <div runat="server" id="divTopLeft" class="leftcolTop">
                                                </div>
                                                <br />
                                                <asp:Label ID="Label4" runat="server"></asp:Label>
                                                <asp:ValidationSummary ID="vsCarDetail" runat="server" ValidationGroup="cardetail"
                                                    ShowSummary="True" HeaderText="<%$ Resources:Menu,RequiredValidation%>" CssClass="errorSummary" />
                                                <div class="form_col_1_2 left">
                                                    <asp:Label ID="Label5" runat="server" Text="<%$ Resources:CarInsurance,InsuranceType%>" /></div>
                                                <div class="form_col_2_2 left">
                                                    <asp:UpdatePanel ID="uplInsuranceType" runat="server">
                                                        <ContentTemplate>
                                                            <asp:DropDownList ID="ddlInsuranceType" runat="server" AutoPostBack="True" onchange="SetDisplay(this.value);ClearChkCompareHid();"
                                                                OnSelectedIndexChanged="ddlInsuranceType_SelectedIndexChanged">
                                                                <asp:ListItem Value="10" Text="<%$ Resources:CarInsurance,Insurance_ClassOne%>" />
                                                                <asp:ListItem Value="21" Text="<%$ Resources:CarInsurance,Insurance_ClassTwoPlus%>" />
                                                                <asp:ListItem Value="31" Text="<%$ Resources:CarInsurance,Insurance_ClassThreePlus%>" />
                                                                <asp:ListItem Value="30" Text="<%$ Resources:CarInsurance,Insurance_ClassThree%>" />
                                                            </asp:DropDownList>
                                                            <asp:UpdateProgress AssociatedUpdatePanelID="uplInsuranceType" ID="updateProgress3"
                                                                DynamicLayout="false" DisplayAfter="0" runat="server">
                                                                <ProgressTemplate>
                                                                    <div>
                                                                        <img alt="Loading" src="/images/loader/small_loading.gif" />
                                                                    </div>
                                                                </ProgressTemplate>
                                                            </asp:UpdateProgress>
                                                            <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvInsuranceType"
                                                                ControlToValidate="ddlInsuranceType" InitialValue="-1" runat="server" ErrorMessage=""
                                                                Text="" ValidationGroup="cardetail"></asp:RequiredFieldValidator>
                                                        </ContentTemplate>
                                                    </asp:UpdatePanel>
                                                </div>
                                                <div>
                                                </div>
                                                <div class="clear">
                                                </div>
                                                <div class="seperator_form_left">
                                                </div>
                                                <div id="divGarageType" runat="server">
                                                    <div>
                                                        <div class="form_col_1_2 left">
                                                            <asp:Label ID="lblGarageType" runat="server" Text="<%$ Resources:CarInsurance,GarageType%>" />
                                                        </div>
                                                        <div class="form_col_2_2 left">
                                                            <asp:DropDownList ID="ddlGarageType" runat="server">
                                                                <asp:ListItem Value="-1" Text="<%$ Resources:CarInsurance,Select%>" />
                                                                <asp:ListItem Value="1" Selected="True" Text="<%$ Resources:CarInsurance,Garage_Authorized%>" />
                                                                <asp:ListItem Value="2" Text="<%$ Resources:CarInsurance,Garage_Dealer%>" />
                                                            </asp:DropDownList>
                                                            <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvGarageType"
                                                                ControlToValidate="ddlGarageType" InitialValue="-1" runat="server" ErrorMessage=""
                                                                Text="" ValidationGroup="cardetail"></asp:RequiredFieldValidator>
                                                        </div>
                                                        <div class="left">
                                                            <a runat="server" href="<%$ Resources:CarInsuranceToolTips,GarageType%>" class="jTip"
                                                                id="two" name="<%$ Resources:CarInsurance,Help%>">
                                                                <img src="/images/icon/help.png" width="20" height="20" alt="Help" /></a></div>
                                                    </div>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                </div>
                                                <div style="display: none">
                                                    <div class="form_col_1_2 left">
                                                        <asp:Label ID="lblCarModelYear" runat="server" Text="<%$ Resources:CarInsurance,CarModelYear%>" /></div>
                                                    <div class="form_col_2_2 left">
                                                        <asp:UpdatePanel ID="uplManYear" runat="server">
                                                            <ContentTemplate>
                                                                <asp:DropDownList ID="ddlManufactYear" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlManufactYear_SelectedIndexChanged">
                                                                    <asp:ListItem Text="<%$ Resources:CarInsurance,Select%>" Value="-1" />
                                                                </asp:DropDownList>
                                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvManufactYear"
                                                                    ControlToValidate="ddlManufactYear" InitialValue="-1" runat="server" ErrorMessage=""
                                                                    Text="" ValidationGroup="cardetail"></asp:RequiredFieldValidator>
                                                            </ContentTemplate>
                                                        </asp:UpdatePanel>
                                                    </div>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                </div>
                                                <div style="display: none">
                                                    <div class="form_col_1_2 left">
                                                        <asp:Label ID="Label6" runat="server" Text="<%$ Resources:CarInsurance,CarMakeModel%>" /></div>
                                                    <div class="form_col_2_2 left">
                                                        <asp:UpdatePanel ID="uplCarInfo" runat="server">
                                                            <ContentTemplate>
                                                                <asp:DropDownList runat="server" ID="ddlCarMake" AutoPostBack="true" OnSelectedIndexChanged="ddlCarMake_SelectedIndexChanged">
                                                                    <asp:ListItem Text="<%$ Resources:CarInsurance,Select%>" Value="-1" />
                                                                </asp:DropDownList>
                                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvCarMake" ControlToValidate="ddlCarMake"
                                                                    InitialValue="-1" runat="server" ErrorMessage="" Text="" ValidationGroup="cardetail"></asp:RequiredFieldValidator>
                                                                <asp:DropDownList runat="server" ID="ddlModelBodyCCDoor" AutoPostBack="True" OnSelectedIndexChanged="ddlModelBodyCCDoor_SelectedIndexChanged">
                                                                    <asp:ListItem Value="-1" Text="<%$ Resources:CarInsurance,Select%>"></asp:ListItem>
                                                                </asp:DropDownList>
                                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvModelBodyCCDoor"
                                                                    ControlToValidate="ddlModelBodyCCDoor" InitialValue="-1" runat="server" ErrorMessage=""
                                                                    Text="" ValidationGroup="cardetail"></asp:RequiredFieldValidator>
                                                                <asp:Label Visible="false" runat="server" ID="lblModelDesc" />
                                                                <asp:Label runat="server" ID="lblCarVehicleType" Text="" Visible="false" />
                                                            </ContentTemplate>
                                                        </asp:UpdatePanel>
                                                    </div>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                </div>
                                                <div id="divYesAccMod" runat="server">
                                                    <div>
                                                        <div class="form_col_1_2 left">
                                                            <asp:Label ID="lblYesAccModTitle" runat="server" Text="<%$ Resources:CarInsurance,AccessaryAndModification%>" /></div>
                                                        <div class="form_col_2_2 left">
                                                            <div class="form_col_2_2 left">
                                                                <asp:UpdatePanel ID="uplYesAccMod" runat="server">
                                                                    <ContentTemplate>
                                                                        <asp:RadioButton ID="rdoYesAccMod" onclick="CheckAccMod();CheckAccModValidationCss();"
                                                                            runat="server" GroupName="accmod" />
                                                                        <asp:Label ID="lblYesAccMod" runat="server" Text="<%$ Resources:CarInsurance,Option_YesHave%>"></asp:Label>
                                                                        &nbsp;
                                                                        <asp:RadioButton ID="rdoNoAccMod" onclick="CheckAccMod();CheckAccModValidationCss();"
                                                                            runat="server" GroupName="accmod" Checked="true" />
                                                                        <asp:Label ID="lblNoAccMod" runat="server" Text="<%$ Resources:CarInsurance,Option_NoHave%>"></asp:Label>
                                                                        <div style="display: none">
                                                                            <asp:TextBox ID="txtAccMod" runat="server"></asp:TextBox>
                                                                        </div>
                                                                        <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvAccMod" runat="server"
                                                                            ControlToValidate="txtAccMod" ErrorMessage="" ValidationGroup="cardetail" Display="Dynamic"></asp:RequiredFieldValidator>
                                                                    </ContentTemplate>
                                                                </asp:UpdatePanel>
                                                            </div>
                                                        </div>
                                                        <div class="left">
                                                            <a runat="server" href="<%$Resources:CarInsuranceToolTips,AccAndMod%>" class="jTip"
                                                                id="A2" name="<%$ Resources:CarInsurance,Help%>">
                                                                <img src="/images/icon/help.png" width="20" height="20" alt="Help" /></a></div>
                                                    </div>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                </div>
                                                <div id="divAccModAmount" style="display: none;">
                                                    <div>
                                                        <div class="form_col_1_2 comp left">
                                                            <asp:Label ID="lblAccModAmountTitle" runat="server" Text="<%$ Resources:CarInsurance,AccessaryAndModificationAmount%>" /></div>
                                                        <div class="form_col_2_2 left">
                                                            <asp:TextBox ID="txtAccModAmount" runat="server" MaxLength="7" />
                                                            <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvAccModAmount"
                                                                runat="server" ControlToValidate="txtAccModAmount" ErrorMessage="" ValidationGroup="cardetail"
                                                                Display="Dynamic"></asp:RequiredFieldValidator>
                                                            <asp:RegularExpressionValidator CssClass="validationErrorControl" ID="revAccModAmount"
                                                                ValidationExpression="^\d+$" runat="server" ControlToValidate="txtAccModAmount"
                                                                ErrorMessage="" ValidationGroup="cardetail" Display="Dynamic"></asp:RegularExpressionValidator>
                                                            <asp:CustomValidator CssClass="validationErrorControl" ID="csvAccModAmount" ClientValidationFunction="CheckAccModAmount"
                                                                OnServerValidate="CheckAccModAmount" runat="server" ControlToValidate="txtAccModAmount"
                                                                ErrorMessage="" ValidationGroup="cardetail" Display="Dynamic"></asp:CustomValidator>
                                                        </div>
                                                    </div>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                </div>
                                                <div style="display: none;">
                                                    <div class="form_col_1_2 comp left">
                                                        <asp:Label ID="lblVehicleType" runat="server" Text="<%$ Resources:CarInsurance,VehicleType%>" /></div>
                                                    <div class="form_col_2_2 left">
                                                        <asp:UpdatePanel ID="uplVehicleType" runat="server">
                                                            <ContentTemplate>
                                                                <asp:DropDownList ID="ddlVehicleType" runat="server" OnSelectedIndexChanged="ddlVehicleType_SelectedIndexChanged"
                                                                    AutoPostBack="True">
                                                                    <asp:ListItem Value="110" Text="<%$ Resources:CarInsurance,VehicleType_Private%>" />
                                                                </asp:DropDownList>
                                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvVehicleType"
                                                                    ControlToValidate="ddlVehicleType" InitialValue="-1" runat="server" ErrorMessage=""
                                                                    Text="" ValidationGroup="cardetail"></asp:RequiredFieldValidator>
                                                            </ContentTemplate>
                                                        </asp:UpdatePanel>
                                                        <div id="divSumInsured" style="display: none;">
                                                            <div>
                                                                <div class="indicator trebo_font">
                                                                    <asp:UpdatePanel ID="uplSumInsured" runat="server">
                                                                        <ContentTemplate>
                                                                            <asp:Label runat="server" Text="<%$ Resources:CarInsurance,SumInsured%>" ID="lblSumInsuredTitle"
                                                                                Visible="false" />
                                                                            <asp:Label runat="server" ID="lblSumInsured" Text="0" Visible="false" />
                                                                            <div style="display: none">
                                                                                <asp:TextBox ID="txtSumInsured" MaxLength="9" Width="80px" runat="server" />
                                                                                <asp:TextBox ID="txtNewSumInsured" MaxLength="9" Width="80px" runat="server" />
                                                                                <asp:TextBox ID="txtGroupNo" Text="-1" MaxLength="2" Width="30px" runat="server" />
                                                                            </div>
                                                                            <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvSumInsured"
                                                                                InitialValue="0" ControlToValidate="txtSumInsured" runat="server" ErrorMessage=""
                                                                                Text="" ValidationGroup="cardetail"></asp:RequiredFieldValidator>
                                                                            <asp:RegularExpressionValidator CssClass="validationErrorControl" ID="revSumInsured"
                                                                                ValidationExpression="^\d+$" ControlToValidate="txtSumInsured" runat="server"
                                                                                ErrorMessage="" Text="" ValidationGroup="cardetail"></asp:RegularExpressionValidator>
                                                                            <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvGroupNo" InitialValue="-1"
                                                                                ControlToValidate="txtSumInsured" runat="server" ErrorMessage="" Text="" ValidationGroup="cardetail"></asp:RequiredFieldValidator>
                                                                        </ContentTemplate>
                                                                    </asp:UpdatePanel>
                                                                </div>
                                                            </div>
                                                            <div class="clear">
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                </div>
                                                <div id="divDeduct" runat="server">
                                                    <div>
                                                        <div class="form_col_1_2 left">
                                                            <asp:Label ID="lblDeduct" runat="server" Text="<%$ Resources:CarInsurance,DEC%>" /></div>
                                                        <div class="form_col_2_2 left">
                                                            <asp:DropDownList ID="ddlDeduct" Width="100px" runat="server">
                                                                <asp:ListItem Text="<%$ Resources:CarInsurance,Option_DeductNo%>" Value="0" />
                                                                <asp:ListItem Text="<%$ Resources:CarInsurance,Option_DeductYes%>" Value="5000" />
                                                                <asp:ListItem Text="<%$ Resources:CarInsurance,Option_DeductAll%>" Selected="True"
                                                                    Value="-1" />
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                </div>
                                                <div id="divProvinceofRegistration" runat="server">
                                                    <div>
                                                        <div class="form_col_1_2 left">
                                                            <asp:Label ID="lblProvinceofRegistration" runat="server" Text="<%$ Resources:CarInsurance,ProvinceofRegistration%>" /></div>
                                                        <div class="form_col_2 left">
                                                            <asp:DropDownList ID="ddlProvinceRegistration" Width="145px" runat="server">
                                                                <asp:ListItem Text="<%$ Resources:CarInsurance,Select%>" Value="-1" />
                                                                <asp:ListItem Text="<%$ Resources:CarInsurance,Province_BKK%>" Selected="True" Value="BKK" />
                                                                <asp:ListItem Text="<%$ Resources:CarInsurance,Province_UPC%>" Value="UPC" />
                                                            </asp:DropDownList>
                                                            <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvProvinceRegistration"
                                                                ControlToValidate="ddlProvinceRegistration" runat="server" ErrorMessage="" Text=""
                                                                InitialValue="-1" ValidationGroup="cardetail"></asp:RequiredFieldValidator>
                                                        </div>
                                                    </div>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                </div>
                                                <div id="idAnyClaimLastYear" runat="server">
                                                    <div>
                                                        <div class="form_col_1_2 comp left">
                                                            <asp:Label ID="lblAnyClaimLastYear" runat="server" Text="<%$ Resources:CarInsurance,AnyClaimLastYear%>" /></div>
                                                        <div class="form_col_2_2 left">
                                                            <asp:RadioButton ID="rdoYesClaimLastYear" onclick="CheckClaim();CheckClaimValidationCss();SetClaimNCBYes(this.checked);"
                                                                runat="server" GroupName="anyclaim"></asp:RadioButton>
                                                            <asp:Label ID="lblYesClaimLastYear" runat="server" Text="<%$ Resources:CarInsurance,Option_YesHave%>"></asp:Label>
                                                            &nbsp;
                                                            <asp:RadioButton ID="rdoNoClaimLastYear" onclick="CheckClaim();CheckClaimValidationCss();SetClaimNCBNo(this.checked);"
                                                                runat="server" GroupName="anyclaim" Checked="true"></asp:RadioButton>
                                                            <asp:Label ID="lblNoClaimLastYear" runat="server" Text="<%$ Resources:CarInsurance,Option_NoHave%>"></asp:Label>
                                                            <div style="display: none">
                                                                <asp:TextBox ID="txtAnyClaim" runat="server"></asp:TextBox>
                                                            </div>
                                                            <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvAnyClaim" runat="server"
                                                                ControlToValidate="txtAnyClaim" ErrorMessage="" ValidationGroup="cardetail" Display="Dynamic"
                                                                Text=""></asp:RequiredFieldValidator>
                                                        </div>
                                                    </div>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                </div>
                                                <div id="idNCB" runat="server" style="display: none">
                                                    <div>
                                                        <div class="form_col_1_2 left">
                                                            <asp:Label ID="lblNCB" runat="server" Text="<%$ Resources:CarInsurance,NCB%>" /></div>
                                                        <div class="form_col_2_2 left">
                                                            <asp:DropDownList ID="ddlNCB" Width="70px" runat="server">
                                                                <asp:ListItem Text="<%$ Resources:CarInsurance,Select%>" Value="-1"></asp:ListItem>
                                                                <asp:ListItem Text="0" Value="0"></asp:ListItem>
                                                                <asp:ListItem Text="20" Selected="True" Value="20"></asp:ListItem>
                                                                <asp:ListItem Text="30" Value="30"></asp:ListItem>
                                                                <asp:ListItem Text="40" Value="40"></asp:ListItem>
                                                                <asp:ListItem Text="50" Value="50"></asp:ListItem>
                                                            </asp:DropDownList>
                                                            %<asp:HiddenField runat="server" ID="hidNCBClaim" />
                                                            <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvNCB" Enabled="true"
                                                                runat="server" InitialValue="-1" ControlToValidate="ddlNCB" ErrorMessage="" ValidationGroup="cardetail"></asp:RequiredFieldValidator>
                                                        </div>
                                                        <div class="left">
                                                            <a runat="server" href="<%$Resources:CarInsuranceToolTips,NCB%>" class="jTip" id="A3"
                                                                name="<%$ Resources:CarInsurance,Help%>">
                                                                <img src="/images/icon/help.png" width="20" height="20" alt="Help" /></a></div>
                                                    </div>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                </div>
                                                <div id="divDriver" runat="server">
                                                    <asp:UpdatePanel ID="updDriver" EnableViewState="true" runat="server">
                                                        <ContentTemplate>
                                                            <div runat="server" id="divSpecifyDriver" visible="true">
                                                                <div class="form_col_1_2 left">
                                                                    <asp:Label ID="lblSpecifyNamedDriver" runat="server" Text="<%$ Resources:CarInsurance,SpecifyNamedDriver%>"></asp:Label></div>
                                                                <div class="form_col_2_2 left" id="divYesAddDriver">
                                                                    <asp:RadioButton AutoPostBack="true" ID="rdoYesAddDriver" CausesValidation="false"
                                                                        runat="server" GroupName="adddriver" OnCheckedChanged="rdoYesAddDriver_CheckedChanged" />
                                                                   <asp:Label ID="lblYesAddDriver" runat="server" Text="<%$ Resources:CarInsurance,Option_YesSpecify%>"></asp:Label>
                                                                    &nbsp;
                                                                    <asp:RadioButton AutoPostBack="true" ID="rdoNoAddDriver" CausesValidation="false"
                                                                        Checked="true" runat="server" GroupName="adddriver" OnCheckedChanged="rdoNoAddDriver_CheckedChanged" />
                                                                    <asp:Label ID="lblNoAddDriver" runat="server" Text="<%$ Resources:CarInsurance,Option_NoSpecify%>"></asp:Label>
                                                                    <div style="display: none">
                                                                        <asp:TextBox ID="txtAddDriver" runat="server"></asp:TextBox>
                                                                    </div>
                                                                    <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvAddDriver" runat="server"
                                                                        ControlToValidate="txtAddDriver" ErrorMessage="" ValidationGroup="cardetail"
                                                                        Display="Dynamic"></asp:RequiredFieldValidator>
                                                                </div>
                                                                <div class="left">
                                                                    <a runat="server" href="<%$Resources:CarInsuranceToolTips,DriverName%>" class="jTip"
                                                                        id="three" name="<%$ Resources:CarInsurance,Help%>">
                                                                        <img src="/images/icon/help.png" width="20" height="20" alt="Help" /></a></div>
                                                            </div>
                                                            <div class="seperator_form_left">
                                                            </div>
                                                        </ContentTemplate>
                                                    </asp:UpdatePanel>
                                                    <asp:UpdatePanel ID="uplDriverList" EnableViewState="true" runat="server">
                                                        <ContentTemplate>
                                                            <div id="divAddDriver" runat="server">
                                                                <div class="form_col_1_2 left">
                                                                    <asp:Label ID="lblNoOfAdditionalDrivers" runat="server" Text="<%$ Resources:CarInsurance,NoOfNamedDrivers%>" /></div>
                                                                <div class="form_col_2_2 left">
                                                                    <asp:DropDownList CausesValidation="false" AutoPostBack="true" ID="ddlDriverCount"
                                                                        runat="server" Width="50px" OnSelectedIndexChanged="ddlDriverCount_SelectedIndexChanged">
                                                                        <asp:ListItem>1</asp:ListItem>
                                                                        <asp:ListItem>2</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                    <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvNoOfDriver"
                                                                        runat="server" ControlToValidate="ddlDriverCount" InitialValue="-1" ErrorMessage=""
                                                                        ValidationGroup="cardetail"></asp:RequiredFieldValidator>
                                                                </div>
                                                            </div>
                                                            <asp:Panel ID="pnlDriver" runat="server" Width="100%">
                                                                <div id="divDriver1" runat="server">
                                                                    <uc4:usrCarDriver ID="UsrCarDriver1" runat="server" DriverNo="1" ValidationGroup="cardetail"
                                                                        IsEnabled="true" />
                                                                </div>
                                                                <div id="divDriver2" runat="server" visible="false">
                                                                    <uc4:usrCarDriver ID="UsrCarDriver2" runat="server" DriverNo="2" ValidationGroup="cardetail"
                                                                        IsEnabled="true" />
                                                                </div>
                                                            </asp:Panel>
                                                        </ContentTemplate>
                                                    </asp:UpdatePanel>
                                                </div>
                                                <div id="divCTPL" runat="server" style="display: none;">
                                                    <div>
                                                        <div class="form_col_1_2 left">
                                                            <asp:Label ID="lblCTPL" runat="server" Text="<%$ Resources:CarInsurance,CTPL%>" /></div>
                                                        <div class="form_col_2_2 left">
                                                            <asp:RadioButton ID="rdoYesCTPL" onclick="CheckCTPL();CheckCTPLValidationCss();"
                                                                runat="server" GroupName="ctpl" />
                                                            <asp:Label ID="lblYesCTPL" runat="server" Text="<%$ Resources:CarInsurance,Option_Yes%>"></asp:Label>
                                                            &nbsp;
                                                            <asp:RadioButton ID="rdoNoCTPL" onclick="CheckCTPL();CheckCTPLValidationCss();" runat="server"
                                                                GroupName="ctpl" Checked="true" />
                                                            <asp:Label ID="lblNoCTPL" runat="server" Text="<%$ Resources:CarInsurance,Option_No%>"></asp:Label>
                                                            <div style="display: none">
                                                                <asp:TextBox ID="txtCTPL" runat="server"></asp:TextBox>
                                                            </div>
                                                            <asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvCTPL" runat="server"
                                                                ControlToValidate="txtCTPL" ErrorMessage="" ValidationGroup="cardetail" Display="Dynamic"></asp:RequiredFieldValidator>
                                                        </div>
                                                    </div>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                </div>
                                                <div style="display: none">
                                                    <div class="form_col_1_2 comp left">
                                                        <asp:Label ID="Label7" runat="server" Text="<%$ Resources:CarInsurance,Name%>" /></div>
                                                    <div class="form_col_2_2 left">
                                                        <asp:TextBox ID="txtName" Width="230" MaxLength="50" runat="server"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="rfvName" runat="server" CssClass="validationErrorControl"
                                                            ValidationGroup="cardetail" ErrorMessage="" Text="" ControlToValidate="txtName"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator ID="revName" runat="server" ValidationGroup="cardetail"
                                                            ValidationExpression="^[\p{L}\d]*[^#$%^&*():/\.'^<>]*$" CssClass="validationErrorControl"
                                                            ControlToValidate="txtName" ErrorMessage=""></asp:RegularExpressionValidator>
                                                    </div>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                    <asp:UpdatePanel ID="uplConfirmEmail" runat="server">
                                                        <ContentTemplate>
                                                            <div>
                                                                <div class="form_col_1_2 left">
                                                                    <asp:Label ID="lblEmail" runat="server" Text="<%$ Resources:CarInsurance,EmailAddress%>" /></div>
                                                                <div class="form_col_2_2 left">
                                                                    <asp:TextBox ID="txtEmailAddress" runat="server" MaxLength="100" Width="230" AutoPostBack="true"></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="rfvEmail" runat="server" Text="" CssClass="validationErrorControl"
                                                                        ValidationGroup="cardetail" ErrorMessage="" ControlToValidate="txtEmailAddress"
                                                                        Display="Dynamic"></asp:RequiredFieldValidator>
                                                                    <asp:RegularExpressionValidator ID="rfvEmailValid" Text="" CssClass="validationErrorControl"
                                                                        runat="server" ValidationGroup="cardetail" ErrorMessage="" ControlToValidate="txtEmailAddress"
                                                                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>
                                                                </div>
                                                                <div class="left">
                                                                    <a runat="server" href="<%$Resources:CarInsuranceToolTips,Email%>" class="jTip" id="A4"
                                                                        name="<%$ Resources:CarInsurance,Help%>">
                                                                        <img src="/images/icon/help.png" width="20" height="20" alt="Help" /></a></div>
                                                            </div>
                                                        </ContentTemplate>
                                                    </asp:UpdatePanel>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                    <div>
                                                        <div class="form_col_1_2 left">
                                                            <asp:Label ID="lblMobileNo" runat="server" Text="<%$ Resources:CarInsurance,MobileNo%>" /></div>
                                                        <div class="form_col_2_2 left">
                                                            <uc10:usrPhoneNo ID="txtMobileNo" ValidationGroup="cardetail" IsEnabled="true" PhoneNoErrorMessage="Mobile Phone No must be number value."
                                                                PhoneNoValidErrorMessage="Mobile phone no is not valid." IsRequired="true" PhoneNoRequireErrorMessage="Require Mobile Phone No."
                                                                runat="server" />
                                                        </div>
                                                        <div class="left">
                                                            <a runat="server" href="<%$Resources:CarInsuranceToolTips,Mobile%>" class="jTip"
                                                                id="A5" name="<%$ Resources:CarInsurance,Help%>">
                                                                <img src="/images/icon/help.png" width="20" height="20" alt="Help" /></a></div>
                                                    </div>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                    <div>
                                                        <div class="form_col_1_2 left">
                                                            <asp:Label ID="lblOccupation" runat="server" Text="<%$ Resources:CarInsurance,Occupation%>" /></div>
                                                        <div class="form_col_2_2 left">
                                                            <uc5:usrOccupation ID="ddlOccupation" runat="server" IsEnabled="true" ValidationGroup="cardetail"
                                                                ErrorMessage="" />
                                                        </div>
                                                    </div>
                                                    <div class="seperator_form_left">
                                                    </div>
                                                </div>
                                                <asp:HiddenField runat="server" ID="hidCoverageCommenceDate" />
                                                <asp:CheckBox ID="checkIsAgreement" runat="server" Checked="true" Text="<%$ Resources:CarInsurance,Agreement%>" />
                                                <div>
                                                    <div style="width: 300px; text-align: center">
                                                        <asp:Button ID="ibtNext" onmousedown="this.className = 'button_refreshquote_mousedown';"
                                                            onmouseup="this.className = 'button_refreshquote';" onmouseout="this.className = 'button_refreshquote';"
                                                            CssClass="button_refreshquote" OnClientClick="LoadValidationErrorCss();CheckOptionValidationCss();ClearChkCompareHid();if (Page_ClientValidate('cardetail')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'button_processing';}"
                                                            runat="server" ValidationGroup="cardetail" ToolTip="Refresh Quote" CausesValidation="true"
                                                            OnClick="btnNext_Click" />
                                                    </div>
                                                    <br />
                                                    <!-- Form | End   -->
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="divhalf2">
                                        <input type="text" id="hidStrResultCompare" runat="server" style="display: none;" />
                                        <input type="text" id="hidBtnCompareId" style="display: none;" />
                                        <input type="text" id="hidLblChkCompare" style="display: none;" />
                                        <asp:Label ID="lblCompareInfo" runat="server" Text='<%$Resources:CarInsuranceResultPage,Compare4Items%>' />
                                        <asp:UpdatePanel ID="uplCarResult" runat="server">
                                            <ContentTemplate>
                                                <input type="text" id="hidProvider" runat="server" style="display: none;" />
                                                <asp:Repeater ID="rptCarResult" runat="server" OnItemDataBound="rptCarResult_ItemDataBound"
                                                    OnItemCommand="rptCarResult_ItemCommand">
                                                    <HeaderTemplate>
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <div class="rowResult">
                                                            <asp:Label ID="lblProviderId" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ProviderCompanyId")%>'
                                                                Visible="false" />
                                                            <asp:Label ID="lblCarId" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CarId")%>'
                                                                Visible="false" />
                                                            <asp:Label ID="lblTempResultId" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CITempResultId")%>'
                                                                Visible="false" />
                                                            <div class="pad">
                                                                <div class="brand" style="height: 150px; vertical-align: top;">
                                                                    <asp:Image ID="imgProvider" runat="server" Width="160" Height="56px" AlternateText='<%# DataBinder.Eval(Container.DataItem, "PackageName")%>'
                                                                        ImageUrl='<%# DataBinder.Eval(Container.DataItem, "CompanyLogoWebUrl")%>' />
                                                                    <div style="padding-top: 12px">
                                                                        <input type="checkbox" id="chkCompare" name='<%# Eval("CITempResultId").ToString() %>'
                                                                            value='<%# Container.FindControl("btnCompare").ClientID %>' onclick="SetResultToCompare(this,this.name,this.value);" />
                                                                        <span id="spnChkCompare" runat="server">Add to compare</span>
                                                                        <asp:Button runat="server" ID="btnCompare" Text='<%$Resources:CarInsuranceResultPage,Compare%>'
                                                                            CssClass="button_yellow_bg" Style="display: none;" onmousedown="this.className = 'button_yellow_bg';"
                                                                            onmouseup="this.className = 'button_yellow_bg';" onmouseout="this.className = 'button_yellow_bg';"
                                                                            CausesValidation="false" CommandName="compare" OnClientClick="this.removeAttribute('onmouseout'); this.removeAttribute('onmouseup'); this.className = 'button_yellow_bg';" />
                                                                    </div>
                                                                </div>
                                                                <div class="features">
                                                                    <div class="holder_wrap">
                                                                        <div class="holder_wrap_img" style="left: 255px">
                                                                            <img runat="server" id="imgSpecial" alt="Special Offer" src="/images/icon/special.png"
                                                                                style="display: none" />
                                                                        </div>
                                                                        <asp:Label ID="lblPackageName" CssClass="divPackageName" ToolTip='<%# DataBinder.Eval(Container.DataItem, "PackageName").ToString().Replace("&", "&amp;")%>'
                                                                            Text='<%# DataBinder.Eval(Container.DataItem, "PackageName").ToString().Replace("&", "&amp;")%>'
                                                                            runat="server" />
                                                                        <div id="divSpecialNCB" runat="server" class="dark" style="display: none">
                                                                            <b>
                                                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "SpecialNCB")%></b>
                                                                        </div>
                                                                    </div>
                                                                    <div class="main left" style="width: 165px">
                                                                        <%=GetGlobalResourceObject("CarInsuranceResultPage", "Deductible")%>
                                                                        : <span class="dark">
                                                                            <asp:Label ID="lblDeductible" runat="server" />
                                                                        </span>
                                                                        <br />
                                                                        <%=GetGlobalResourceObject("CarInsuranceResultPage", "CoverOwnDamage")%>
                                                                        : <span class="dark">
                                                                            <asp:Label ID="lblSumInsured" runat="server" />
                                                                        </span>
                                                                    </div>
                                                                    <div class="left">
                                                                        <div class="divH1">
                                                                            <%# DataBinder.Eval(Container.DataItem, "PromotionPrice", "{0:#,0.00}")%>&nbsp;
                                                                            <span style="font-size: 12px;">
                                                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "THBCurrency")%></span>
                                                                        </div>
                                                                        <div class="divH2" style="display: none">
                                                                            &nbsp;<asp:Label ID="lblPremiumPrice" runat="server" Text="" />
                                                                            &nbsp;<asp:Label ID="lblAnnualPremium" runat="server" Text="" />
                                                                        </div>
                                                                    </div>
                                                                    <div class="flood left" id="divFlood" runat="server">
                                                                        <%=GetGlobalResourceObject("CarInsuranceResultPage", "FloodCover")%>
                                                                    </div>
                                                                    <div class="discount right" id="divDiscount" runat="server" style="display: none">
                                                                        <asp:Label ID="lblDiscount" runat="server" Text="<%$Resources:CarInsuranceResultPage,OFF%>" />
                                                                    </div>
                                                                </div>
                                                                <div class="cta">
                                                                    <div style="float: left">
                                                                        <asp:Button runat="server" ID="btnBuyOnline" Visible="true" CssClass="button_buyonline center"
                                                                            onmousedown="this.className = 'button_buyonline center';" onmouseup="this.className = 'button_buyonline center';"
                                                                            onmouseout="this.className = 'button_buyonline center';" CausesValidation="false"
                                                                            CommandName="buyonline" OnClientClick="this.removeAttribute('onmouseout'); this.removeAttribute('onmouseup'); this.className = 'button_buyonline';" /></div>
                                                                    <div class="separator_7px">
                                                                    </div>
                                                                    <div style="float: left">
                                                                        <asp:Button runat="server" ID="btnCallforDiscount" Visible="true" CssClass="button_callfordiscount center"
                                                                            onmousedown="this.className = 'button_callfordiscount center';" onmouseup="this.className = 'button_callfordiscount center';"
                                                                            onmouseout="this.className = 'button_callfordiscount center';" CausesValidation="false"
                                                                            CommandName="callfordiscount" OnClientClick="this.removeAttribute('onmouseout'); this.removeAttribute('onmouseup'); this.className = 'button_callfordiscount';" /></div>
                                                                    <div class="separator_7px">
                                                                    </div>
                                                                    <div style="float: left">
                                                                        <asp:Button runat="server" ID="btnMoreInfo" Visible="true" CssClass="button_moreinfo center"
                                                                            onmousedown="this.className = 'button_moreinfo center';" onmouseup="this.className = 'button_moreinfo center';"
                                                                            onmouseout="this.className = 'button_moreinfo center';" CausesValidation="false"
                                                                            CommandName="moreinfo" OnClientClick="this.removeAttribute('onmouseout'); this.removeAttribute('onmouseup'); this.className = 'button_moreinfo';" /></div>
                                                                    <%--</asp:HyperLink>--%>
                                                                    <%--</a>--%>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                                <asp:Button ID="Button1" runat="server" Text="Button" Style="display: none;" />
                                                <cc1:ModalPopupExtender ID="mpeCallPop" runat="server" TargetControlID="Button1"
                                                    PopupControlID="PanelCallMepop" BehaviorID="behCallMepop" BackgroundCssClass="modalBackground"
                                                    CancelControlID="aXCallPop" DropShadow="false">
                                                    <%--btnSubmit--%>
                                                </cc1:ModalPopupExtender>
                                                <asp:Panel ID="PanelCallMepop" runat="server" Style="display: none; background-color: White;">
                                                    <div id="container_callme" style="height: 550px;">
                                                        <div class="divXPop right">
                                                            <a id="aXCallPop" runat="server" onclick="HidePopupMsgCall();">X </a>
                                                        </div>
                                                        <div class="padding_30px">
                                                            <h1>
                                                                <%=GetGlobalResourceObject("CarInsurance", "CallYouBack")%></h1>
                                                            <div class="seperator">
                                                            </div>
                                                            <div style="width: 430px;">
                                                                <%=GetGlobalResourceObject("CarInsurance", "CallMeNow")%>
                                                            </div>
                                                            <div class="seperator_15px">
                                                            </div>
                                                            <!--  Form  |  Starts   --->
                                                            <div style="width: 430px;">
                                                                <asp:ValidationSummary ID="vsCallme" runat="server" ValidationGroup="callme" ShowSummary="True"
                                                                    HeaderText="<%$ Resources:Menu,RequiredValidation%>" CssClass="errorSummary" />
                                                            </div>
                                                            <div id="divExisting" runat="server">
                                                                <div class="form_col_1 left">
                                                                    <asp:Label ID="lblExistingUser" runat="server" Text="<%$ Resources:CarInsurance,ExistingUser%>" /></div>
                                                                <div class="form_col_2 left">
                                                                    <div class="form_col_2 left">
                                                                        <asp:RadioButton ID="rdoExistingNo" runat="server" GroupName="existinguser" Checked="true" />
                                                                        <asp:Label ID="lblNo" runat="server" Text="<%$ Resources:CarInsurance,Option_No%>"></asp:Label>
                                                                        &nbsp;
                                                                        <asp:RadioButton ID="rdoExistingYes" runat="server" Text="" GroupName="existinguser" />
                                                                        <asp:Label ID="lblYes" runat="server" Text="<%$ Resources:CarInsurance,Option_Yes%>"></asp:Label>
                                                                    </div>
                                                                </div>
                                                                <br />
                                                                <br />
                                                                <div class="seperator_form">
                                                                </div>
                                                            </div>
                                                            <div>
                                                                <div class="form_col_1 comp left">
                                                                    <asp:Label ID="lblFullName" runat="server" Text="<%$ Resources:CarInsurance,FullName%>" /></div>
                                                                <div class="form_col_2 left">
                                                                    <asp:TextBox ID="txtCallMeFullNamePop" Width="230" MaxLength="50" runat="server"></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="rfvCallMeFullName" runat="server" CssClass="validationErrorControl"
                                                                        ValidationGroup="callme" ErrorMessage="" Text="" ControlToValidate="txtCallMeFullNamePop"></asp:RequiredFieldValidator>
                                                                    <asp:RegularExpressionValidator ID="revCallMeFullName" runat="server" ValidationGroup="callme"
                                                                        ValidationExpression="^([\u0000-\uDFFF']{1,50})$|^([a-zA-Z''-'\s]{1,50})$" CssClass="validationErrorControl"
                                                                        ControlToValidate="txtCallMeFullNamePop" ErrorMessage=""></asp:RegularExpressionValidator>
                                                                </div>
                                                            </div>
                                                            <div>
                                                                <div class="seperator_form">
                                                                </div>
                                                                <div>
                                                                    <div class="form_col_1 comp left">
                                                                        <asp:Label ID="lblEmailPop" runat="server" Text="<%$ Resources:CarInsurance,EmailAddress%>" /></div>
                                                                    <div class="form_col_2 left">
                                                                        <asp:TextBox ID="txtEmailPop" runat="server" MaxLength="100" Width="230"></asp:TextBox>
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Text="" CssClass="validationErrorControl"
                                                                            ValidationGroup="callme" ErrorMessage="" ControlToValidate="txtEmailPop" Display="Dynamic"></asp:RequiredFieldValidator>
                                                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" Text="" CssClass="validationErrorControl"
                                                                            runat="server" ValidationGroup="callme" ErrorMessage="" ControlToValidate="txtEmailPop"
                                                                            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>
                                                                    </div>
                                                                </div>
                                                                <div class="seperator_form">
                                                                </div>
                                                                <div>
                                                                    <div class="form_col_1 comp left">
                                                                        <asp:Label ID="lblMobileNoPop" runat="server" Text="<%$ Resources:CarInsurance,MobileNo%>" /></div>
                                                                    <div class="form_col_2 left" style="width: 230;">
                                                                        <uc10:usrPhoneNo ID="usrCallMePhoneNo" ValidationGroup="callme" IsEnabled="true"
                                                                            PhoneNoErrorMessage="Mobile Phone No must be number value." PhoneNoValidErrorMessage="Mobile phone no is not valid."
                                                                            IsRequired="true" PhoneNoRequireErrorMessage="Require Mobile Phone No." runat="server" />
                                                                    </div>
                                                                </div>
                                                                <div class="seperator_form">
                                                                </div>
                                                                <div>
                                                                    <div class="form_col_1 comp left">
                                                                        <%=GetGlobalResourceObject ("CarInsurance","CallMeAt") %></div>
                                                                    <div class="form_col_2 left">
                                                                        <asp:DropDownList CssClass="contactDropdown" Font-Size="12px" runat="server" ID="ddlCallMeTime">
                                                                            <asp:ListItem Value="-1" Text="<%$Resources:CarInsurance,Select %>" />
                                                                            <asp:ListItem Value="1" Text="<%$Resources:CarInsurance,CallMeMorning %>" />
                                                                            <asp:ListItem Value="2" Text="<%$Resources:CarInsurance,CallMeAfternoon %>" />
                                                                            <asp:ListItem Value="3" Text="<%$Resources:CarInsurance,CallMeEvening %>" />
                                                                            <asp:ListItem Value="4" Text="<%$Resources:CarInsurance,CallMeAnytime %>" />
                                                                        </asp:DropDownList>
                                                                        <asp:RequiredFieldValidator ID="rfvCallMeTime" runat="server" CssClass="validationErrorControl"
                                                                            ValidationGroup="callme" ErrorMessage="" Text="" InitialValue="-1" ControlToValidate="ddlCallMeTime"></asp:RequiredFieldValidator>
                                                                    </div>
                                                                </div>
                                                                <div class="seperator_form">
                                                                </div>
                                                                <div id="divCallMe" runat="server" visible="false">
                                                                    <div class="form_col_1 left">
                                                                        &nbsp;
                                                                    </div>
                                                                    <div class="form_col_2 left">
                                                                        <asp:Label ID="lblCallMeMessage" runat="server" Font-Size="12px" ForeColor="Green"
                                                                            Font-Bold="true" Font-Names="Arial" Text="" />
                                                                    </div>
                                                                </div>
                                                                <div>
                                                                    <div class="form_col_1 left">
                                                                        &nbsp;
                                                                    </div>
                                                                    <div class="form_col_2 left">
                                                                        <asp:Button ID="btnSubmit" Text="<%$ Resources:HomePage,Submit%>" CssClass="button_submit"
                                                                            OnClientClick="LoadValidationErrorCss();if (Page_ClientValidate('callme')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'button_processing';}"
                                                                            runat="server" ValidationGroup="reminder" AlternateText="Next" ToolTip="Next"
                                                                            CausesValidation="true" OnClick="btnSubmit_Click" />
                                                                    </div>
                                                                </div>
                                                                <!--  Form  |  Ends     --->
                                                                <div class="seperator">
                                                                </div>
                                                                <div style="width: 430px; font-size: 0.85em;">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </asp:Panel>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </div>
                                    <%--</div>--%>
                                    <div class="seperator">
                                    </div>
                                    <div style="height: 150px" runat="server" id="divMessage" visible="false">
                                        <asp:Label ID="lblMessage" Font-Size="20px" Font-Bold="true" runat="server" Visible="false"></asp:Label>
                                        <input runat="server" id="hidCurInsuranceCompany" type="hidden" /><input runat="server"
                                            id="hidCurrentInsurer" type="hidden" />
                                    </div>
                                    <div id="divPopupAlert">
                                        <div style="margin: 0 auto; width: 266px; text-align: center; display: none;">
                                            <asp:Button ID="btnPopupAlert" runat="server" />
                                        </div>
                                        <cc1:ModalPopupExtender ID="mpePopupAlert" runat="server" Enabled="true" TargetControlID="btnPopupAlert"
                                            PopupControlID="pnlPopupAlert" DropShadow="true" BehaviorID="mdlPopupAlertMessage">
                                        </cc1:ModalPopupExtender>
                                        <asp:Panel ID="pnlPopupAlert" runat="server" Style="display: none; background-color: White;">
                                            <div class="sr_wrapper_travel_new bg_popup" style="width: 300px; padding: 20px; border: 9px solid #3b3b3b;
                                                overflow: visible; height: auto;">
                                                <div style="height: 100px; letter-spacing: -0.3px">
                                                    <br />
                                                    <h1>
                                                        <%= GetGlobalResourceObject("CarInsurance", "MessageNoRecord")%></h1>
                                                </div>
                                                <div style="text-align: center; width: 100%;">
                                                    <asp:Button ID="btnMessageClose" runat="server" Text="" Width="87px" OnClientClick="HidePopupMsg();ShowHidePopupPanel(true);return false;"
                                                        CssClass="button_close" />
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                </div>
                            </div>
                            <!--  Key Benefits  |  Starts  -->
                            <div id="keyBenefits">
                                <div class="pad">
                                    <div class="guarantee">
                                        <div class="content">
                                            <a href="javascript:showhide('guaranteeCondition')">
                                                <%= GetGlobalResourceObject("CarInsuranceResultPage", "TermsAndCondition")%></a>
                                        </div>
                                    </div>
                                    <div class="coverage">
                                        <div class="content">
                                            <a href="javascript:showhide('coverageCondition')">
                                                <%= GetGlobalResourceObject("CarInsuranceResultPage", "TermsAndCondition")%></a>
                                        </div>
                                    </div>
                                    <br />
                                    <div id="guaranteeCondition" style="width: 50%; float: left; display: none;">
                                        <br />
                                        <%= GetGlobalResourceObject("CarInsuranceResultPage", "MoneyBackGuaranteeCondition")%>
                                    </div>
                                    <div id="coverageCondition" style="width: 50%; float: right; display: none;">
                                        <br />
                                        <%= GetGlobalResourceObject("CarInsuranceResultPage", "InstantCoverageCondition")%>
                                    </div>
                                </div>
                            </div>
                            <!--  Key Benefits  |  Ends    -->
                            <div class="bottom">
                            </div>
                        </div>
                    </div>
                    <!-- Column Content | End   -->
                </div>
            </div>
            <div class="bottom">
            </div>
        </div>
    </div>
    <%--</div>--%>

    <script type="text/javascript">

        function OpenUrl(url) {
            var winl = (screen.width - 800) / 2;
            var wint = (screen.height - 500) / 2;
            var settings = 'height=500,';
            settings += 'width=800,';
            settings += 'top=' + wint + ',';
            settings += 'left=' + winl + ',';
            settings += 'scrollbars=yes,';
            settings += 'resizable=No';
            window.open(url, 'NEWWIN', settings);
        }
        function OpenWorkshop(coid) {
            var winl = (screen.width - 840) / 2;
            var wint = (screen.height - 500) / 2;
            var settings = 'height=500,';
            settings += 'width=840,';
            settings += 'top=' + wint + ',';
            settings += 'left=' + winl + ',';
            settings += 'scrollbars=yes,';
            settings += 'resizable=No';
            window.open('ViewProviderWorkShop.aspx?comid=' + coid, 'NEWWIN', settings);
        }

        function removeSpaces(mystring) {
            mystring = mystring.toUpperCase();
            return mystring.split(' ').join('');
        }
    </script>

    <script type="text/javascript">
        //        IncreaseProgress(100);
        //        HideLoading();
        //AddMoreInfoRows();
        $(document).ready(function() {

            if ($('div.trigger').length > 0) {
                $('div.trigger').click(function() {
                    if ($(this).hasClass('open')) {
                        $(this).removeClass('open');
                        $(this).addClass('close');
                        $(this).next().slideDown(100);
                        return false;
                    } else {
                        $(this).removeClass('close');
                        $(this).addClass('open');
                        $(this).next().slideUp(100);
                        return false;
                    }
                });
            }

        });
        function ShowHideDiv(divName, varOnOff) {
            if (varOnOff) {
                document.getElementById(divName).style.display = "";
            }
            else {
                document.getElementById(divName).style.display = "none";
            }
        }
        function showhide(divName) {

            el = document.getElementById(divName);
            el.style.display = (el.style.display == "none") ? "" : "none";

        }
    </script>

    <script type="text/javascript">
        /* <![CDATA[ */

        function SetDisplay(val) {
            //var select = document.getElementById('<%=ddlDeduct.ClientID%>');
            //for (i = 0; i < select.options.length; i++) {
            //    if (select.options[i].value == '-1') {
            //        select.options[i] = null;
            //        break;
            //    }
            //}
            if (val == "10") {
                //var opt = document.createElement("option");
                //opt.text = '<%= Resources.CarInsurance.Option_DeductAll%>';
                //opt.value = "-1";
                //select.options.add(opt);
                document.getElementById('<%=rdoNoCTPL.ClientID%>').checked = true;
                document.getElementById('<%=divGarageType.ClientID%>').style.display = '';
                document.getElementById('<%=divYesAccMod.ClientID%>').style.display = '';
                document.getElementById('<%=divProvinceofRegistration.ClientID%>').style.display = '';
                document.getElementById('<%=idAnyClaimLastYear.ClientID%>').style.display = '';
                //document.getElementById('<%=idNCB.ClientID%>').style.display = '';
                document.getElementById('<%=divDriver.ClientID%>').style.display = '';
                document.getElementById('<%=divDeduct.ClientID%>').style.display = '';
                document.getElementById('<%=divCTPL.ClientID%>').style.display = 'none';
                document.getElementById('<%=ddlNCB.ClientID%>').value = "50";
            }
            else if (val == "21" || val == "31") {
                document.getElementById('<%=rdoNoCTPL.ClientID%>').checked = true;
                document.getElementById('<%=divGarageType.ClientID%>').style.display = '';
                document.getElementById('<%=divDeduct.ClientID%>').style.display = '';
                document.getElementById('<%=divProvinceofRegistration.ClientID%>').style.display = 'none';
                document.getElementById('<%=idAnyClaimLastYear.ClientID%>').style.display = 'none';
                //document.getElementById('<%=idNCB.ClientID%>').style.display = 'none';
                document.getElementById('<%=divDriver.ClientID%>').style.display = 'none';
                document.getElementById('<%=divYesAccMod.ClientID%>').style.display = 'none';
                document.getElementById('<%=divCTPL.ClientID%>').style.display = 'none';
            }
            else {
                document.getElementById('<%=divCTPL.ClientID%>').style.display = '';
                document.getElementById('<%=divGarageType.ClientID%>').style.display = 'none';
                document.getElementById('<%=divProvinceofRegistration.ClientID%>').style.display = 'none';
                document.getElementById('<%=idAnyClaimLastYear.ClientID%>').style.display = 'none';
                //document.getElementById('<%=idNCB.ClientID%>').style.display = 'none';
                document.getElementById('<%=divDriver.ClientID%>').style.display = 'none';
                document.getElementById('<%=divYesAccMod.ClientID%>').style.display = 'none';
                document.getElementById('<%=divDeduct.ClientID%>').style.display = 'none';
            }
        }

        function ClearNCB() {
            var select = document.getElementById('<%=ddlNCB.ClientID%>');
            if (select.options.length > 3) {
                for (i = 0; i < select.options.length; i++) {
                    if (select.options[i].value == '30') {
                        select.options[i] = null;
                        break;
                    }
                }
                for (i = 0; i < select.options.length; i++) {
                    if (select.options[i].value == '40') {
                        select.options[i] = null;
                        break;
                    }
                }
                for (i = 0; i < select.options.length; i++) {
                    if (select.options[i].value == '50') {
                        select.options[i] = null;
                        break;
                    }
                }
            }
        }

        function SetClaimNCBYes(val) {
            if (val == true) {
                var select = document.getElementById('<%=ddlNCB.ClientID%>');
                if (select.options.length > 3) {
                    for (i = 0; i < select.options.length; i++) {
                        if (select.options[i].value == '30') {
                            select.options[i] = null;
                            break;
                        }
                    }
                    for (i = 0; i < select.options.length; i++) {
                        if (select.options[i].value == '40') {
                            select.options[i] = null;
                            break;
                        }
                    }
                    for (i = 0; i < select.options.length; i++) {
                        if (select.options[i].value == '50') {
                            select.options[i] = null;
                            break;
                        }
                    }
                }
                document.getElementById('<%=ddlNCB.ClientID%>').value = "0";
            }
        }

        function SetClaimNCBNo(val) {
            if (val == true) {
                var select = document.getElementById('<%=ddlNCB.ClientID%>');
                if (select.options.length == 3) {
                    var opt1 = document.createElement("option");
                    opt1.text = '30';
                    opt1.value = '30';
                    select.options.add(opt1);

                    var opt2 = document.createElement("option");
                    opt2.text = '40';
                    opt2.value = '40';
                    select.options.add(opt2);

                    var opt3 = document.createElement("option");
                    opt3.text = '50';
                    opt3.value = '50';
                    select.options.add(opt3);
                }

                document.getElementById('<%=ddlNCB.ClientID%>').value = "50";
            }
        }


        var pbControl = null;
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_initializeRequest(InitializeRequest);
        prm.add_beginRequest(BeginRequestHandler);
        prm.add_endRequest(EndRequest);
        var postBackElement;
        function InitializeRequest(sender, args) {
            if (prm.get_isInAsyncPostBack())
                args.set_cancel(true);
            postBackElement = args.get_postBackElement();
            //|| postBackElement.id == '<%=rdoYesAddDriver.ClientID%>'
            //|| postBackElement.id == '<%=rdoNoAddDriver.ClientID%>'
            /*if (postBackElement.id == '<%=ddlInsuranceType.ClientID%>'
            || postBackElement.id == '<%=ddlManufactYear.ClientID%>'
            || postBackElement.id == '<%=ddlCarMake.ClientID%>'
            || postBackElement.id == '<%=ddlModelBodyCCDoor.ClientID%>'
            || postBackElement.id == '<%=rdoYesClaimLastYear.ClientID%>'
            || postBackElement.id == '<%=rdoNoClaimLastYear.ClientID%>'
            ) {
            OnOffUpdateProgress(true);
            }*/
            OnOffUpdateProgress(true);
        }

        function OnOffUpdateProgress(onOff) {
            $get('<%=ddlInsuranceType.ClientID%>').disabled = onOff;
            $get('<%=ddlManufactYear.ClientID%>').disabled = onOff;
            $get('<%=ddlCarMake.ClientID%>').disabled = onOff;
            $get('<%=ddlModelBodyCCDoor.ClientID%>').disabled = onOff;
            $get('<%=ddlVehicleType.ClientID%>').disabled = onOff;
            $get('<%=rdoYesAccMod.ClientID%>').disabled = onOff;
            $get('<%=rdoNoAccMod.ClientID%>').disabled = onOff;
            $get('<%=txtAccModAmount.ClientID%>').disabled = onOff;
            if ($get('<%=rdoYesAddDriver.ClientID%>') != null)
                $get('<%=rdoYesAddDriver.ClientID%>').disabled = onOff;
            if ($get('<%=rdoNoAddDriver.ClientID%>') != null)
                $get('<%=rdoNoAddDriver.ClientID%>').disabled = onOff;
            if ($get('<%=ddlDriverCount.ClientID%>') != null)
                $get('<%=ddlDriverCount.ClientID%>').disabled = onOff;
            //$get('<%=rdoYesClaimLastYear.ClientID%>').disabled = onOff;
            //$get('<%=rdoNoClaimLastYear.ClientID%>').disabled = onOff;
            //$get('<%=rdoYesAddDriver.ClientID%>').disabled = onOff;
            //$get('<%=rdoNoAddDriver.ClientID%>').disabled = onOff;
        }

        function BeginRequestHandler(sender, args) {
            pbControl = document.getElementById('<%=ibtNext.ClientID%>');  //the control causing the postback 
            pbControl.disabled = true;
        }

        function EndRequest(sender, args) {
            if (postBackElement.id == '<%=ddlInsuranceType.ClientID%>'
                    || postBackElement.id == '<%=ddlManufactYear.ClientID%>'
                    || postBackElement.id == '<%=ddlCarMake.ClientID%>'
                    || postBackElement.id == '<%=ddlModelBodyCCDoor.ClientID%>'
                    || postBackElement.id == '<%=rdoYesClaimLastYear.ClientID%>'
                    || postBackElement.id == '<%=rdoNoClaimLastYear.ClientID%>'
                    || postBackElement.id == '<%=rdoYesAddDriver.ClientID%>'
                    || postBackElement.id == '<%=rdoNoAddDriver.ClientID%>'
                    || postBackElement.id == '<%=ddlVehicleType.ClientID%>'
                    || postBackElement.id == '<%=ddlDriverCount.ClientID%>') {
                CheckAccMod();
                OnOffUpdateProgress(false);
                //JT_init();
            }
            pbControl.disabled = false;
            pbControl = null;
        }

        window.onload = function() {
            //showhide('divCarMakeModel');
            //CheckedChanged();
            CheckAccMod();
            ShowCompareButton();
            if (document.getElementById('<%=hidNCBClaim.ClientID%>').value == '1') {
                document.getElementById('<%=hidNCBClaim.ClientID%>').value = '';
                ClearNCB();
            }
        }

        function SetPopupCallMe(pcid, instype, carid, uid, spc) {
            document.getElementById('<%=hidden_link.ClientID%>').href = '/car-insurance/callme.aspx?pcid=' + pcid + '&instype=' + instype + '&carid=' + carid + '&uid=' + uid + '&spc=' + spc;

            $("#ctl00_cpBody_hidden_link").trigger('click');
        }

        var CarMakeModel;
        var ArrCarMakeModel;

        function CarMakeClientValidate(source, arguments) {
            if (arguments.Value == -1) {
                arguments.IsValid = false;
            } else {
                arguments.IsValid = true;
            }
        }

        function CarModelClientValidate(source, arguments) {
            if (arguments.Value == -1) {
                arguments.IsValid = false;
            } else {
                arguments.IsValid = true;
            }
        }

        function ShowHideAccMod(varOnOff) {
            document.getElementById('divAccModAmount').style.display = varOnOff == true ? '' : 'none';
            ValidatorEnable(document.getElementById('<%=rfvAccModAmount.ClientID%>'), varOnOff);
            ValidatorEnable(document.getElementById('<%=revAccModAmount.ClientID%>'), varOnOff);
            ValidatorEnable(document.getElementById('<%=csvAccModAmount.ClientID%>'), varOnOff);
        }

        function CheckOptionValidationCss() {
            //CheckRedPlateValidationCss();
            CheckClaimValidationCss();
            CheckCTPLValidationCss();
            CheckAccModValidationCss();
            //alert(document.getElementById('<%=divSpecifyDriver.ClientID%>'));
            if (document.getElementById('<%=divSpecifyDriver.ClientID%>') != null) {
                CheckAddDriverValidationCss();
            }
        }

        //CAR POLICY DETAILS HERE

        function CheckAccModAmount(source, arguments) {
            var _retValue = true;
            var _amount = parseInt(document.getElementById("<%=txtAccModAmount.ClientID%>").value);
            //alert(_amount);
            var txtSumInsured = document.getElementById("<%=txtSumInsured.ClientID%>");
            var lblSumInsured = document.getElementById("<%=lblSumInsured.ClientID%>");
            var txtNewSumInsured = document.getElementById("<%=txtNewSumInsured.ClientID%>");
            var _sumAmount = txtSumInsured.value;
            if (_sumAmount != null) {
                if (_sumAmount <= 0) {
                    _sumAmount = 0;
                }
            }
            else {
                _sumAmount = 0;
            }

            //alert(_sumAmount);
            if (_sumAmount > 0 && _amount > 0) {
                if (_amount > 100000) {
                    //alert("Accessary or Modifications Amount should NOT be greater than 100,000\nor 10% of Sum Insured Amount");
                    //alert("Invalid amount!");
                    _retValue = false;
                }
                else if (_amount > (_sumAmount * 0.1)) {
                    //alert("Accessary or Modifications Amount should NOT be greater than 100,000or 10% of Sum Insured Amount");
                    //alert("Invalid amount!");
                    _retValue = false;
                }
                else if (_amount < 1000) {
                    //alert("Accessories or Modifications amount should be greater than or equal 1000.");

                    _retValue = false;
                }

                if (_retValue == true) {
                    txtNewSumInsured.value = parseInt(txtSumInsured.value) + parseInt(_amount);
                    if (lblSumInsured != null)
                        lblSumInsured.innerHTML = addCommas(txtNewSumInsured.value.toString());
                }
            }
            else {
                _retValue = false;
                //alert("Please select car model first.");
            }

            arguments.IsValid = _retValue;
        }

        function CheckCTPLValidationCss() {
            var ctrlDivYes = 'divYesCTPL';
            var ctrlDivNo = 'divNoCTPL';
            var txtText = '<%=txtCTPL.ClientID%>';
            var valCtrl = '<%=rfvCTPL.ClientID%>';
            ShowValidationEffectOption(ctrlDivYes, ctrlDivNo, txtText, valCtrl);
            return true;
        }

        function CheckAccModValidationCss() {
            var ctrlDivYes = 'divYesAccMod';
            var ctrlDivNo = 'divNoAccMod';
            var txtText = '<%=txtAccMod.ClientID%>';
            var valCtrl = '<%=rfvAccMod.ClientID%>';
            ShowValidationEffectOption(ctrlDivYes, ctrlDivNo, txtText, valCtrl);
            return true;
        }

        function CheckRedPlateValidationCss() {
            var ctrlDivYes = 'divYesRedPlate';
            var ctrlDivNo = 'divNoRedPlate';
            var txtText = '<=txtRedPlate.ClientID>';
            var valCtrl = '<=rfvRedPlate.ClientID>';
            ShowValidationEffectOption(ctrlDivYes, ctrlDivNo, txtText, valCtrl);
            return true;
        }

        function CheckClaimValidationCss() {
            var ctrlDivYes = 'divYesClaimLastYear';
            var ctrlDivNo = 'divNoClaimLastYear';
            var txtText = '<%=txtAnyClaim.ClientID%>';
            var valCtrl = '<%=rfvAnyClaim.ClientID%>';
            ShowValidationEffectOption(ctrlDivYes, ctrlDivNo, txtText, valCtrl);
            return true;
        }

        function CheckAddDriverValidationCss() {
            var ctrlDivYes = 'divYesAddDriver';
            var ctrlDivNo = 'divNoAddDriver';
            var txtText = '<%=txtAddDriver.ClientID%>';
            var valCtrl = '<%=rfvAddDriver.ClientID%>';
            ShowValidationEffectOption(ctrlDivYes, ctrlDivNo, txtText, valCtrl);
            return true;
        }

        function CheckRedPlate() {
            var ctrlTxt = document.getElementById('<=txtRedPlate.ClientID>');
            var ctrlY = document.getElementById('<=rdoYesRedPlate.ClientID>');
            var ctrlN = document.getElementById('<=rdoNoRedPlate.ClientID>');
            var valCtrl = document.getElementById('<=rfvRedPlate.ClientID>');

            if (ctrlY.checked == true || ctrlN.checked == true) {
                ctrlTxt.value = '1';
                valCtrl.style.visibility = 'hidden';
            }
            else {
                ctrlTxt.value = '';
            }
        }

        function CheckClaim() {
            var ctrlTxt = document.getElementById('<%=txtAnyClaim.ClientID%>');
            var ctrlY = document.getElementById('<%=rdoYesClaimLastYear.ClientID%>');
            var ctrlN = document.getElementById('<%=rdoNoClaimLastYear.ClientID%>');
            var valCtrl = document.getElementById('<%=rfvAnyClaim.ClientID%>');

            if (ctrlY.checked == true || ctrlN.checked == true) {
                ctrlTxt.value = '1';
                valCtrl.style.visibility = 'hidden';
            }
            else {
                ctrlTxt.value = '';
            }
        }

        function CheckCTPL() {
            var ctrlTxt = document.getElementById('<%=txtCTPL.ClientID%>');
            var ctrlY = document.getElementById('<%=rdoYesCTPL.ClientID%>');
            var ctrlN = document.getElementById('<%=rdoNoCTPL.ClientID%>');
            var valCtrl = document.getElementById('<%=rfvCTPL.ClientID%>');

            if (ctrlY.checked == true || ctrlN.checked == true) {
                ctrlTxt.value = '1';
                valCtrl.style.visibility = 'hidden';
            }
            else {
                ctrlTxt.value = '';
            }
        }

        function CheckAccMod() {

            var ctrlTxt = document.getElementById('<%=txtAccMod.ClientID%>');
            var ctrlY = document.getElementById('<%=rdoYesAccMod.ClientID%>');
            var ctrlN = document.getElementById('<%=rdoNoAccMod.ClientID%>');
            var valCtrl = document.getElementById('<%=rfvAccMod.ClientID%>');
            var txtNewSumInsured = document.getElementById('<%=txtNewSumInsured.ClientID%>');
            var txtSumInsured = document.getElementById('<%=txtSumInsured.ClientID%>');
            var lblSumInsured = document.getElementById('<%=lblSumInsured.ClientID%>');
            var txtAccModAmount = document.getElementById('<%=txtAccModAmount.ClientID%>');

            if (ctrlY.checked == true || ctrlN.checked == true) {
                ctrlTxt.value = '1';
                valCtrl.style.visibility = 'hidden';
                if (ctrlY.checked == true) {
                    ShowHideAccMod(true);
                    if (lblSumInsured != null)
                        lblSumInsured.innerHTML = addCommas(txtNewSumInsured.value.toString());
                }
                else {
                    ShowHideAccMod(false);
                    txtAccModAmount.value = "0";
                    txtNewSumInsured.value = txtSumInsured.value;
                    //alert(_SumInsured.toString());
                    if (lblSumInsured != null)
                        lblSumInsured.innerHTML = addCommas(txtSumInsured.value.toString());
                }
            }
            else {
                ctrlTxt.value = '';
                ShowHideAccMod(false);
            }
        }

        function addCommas(nStr) {
            nStr += '';
            var x = nStr.split('.');
            var x1 = x[0];
            var x2 = x.length > 1 ? '.' + x[1] : '';
            var rgx = /(\d+)(\d{3})/;
            while (rgx.test(x1)) {
                x1 = x1.replace(rgx, '$1' + ',' + '$2');
            }
            return x1 + x2;
        }

        function CheckAddDriver() {
            //alert('CheckAddDriver');
            var ctrlTxt = document.getElementById('<%=txtAddDriver.ClientID%>');
            var ctrlY = document.getElementById('<%=rdoYesAddDriver.ClientID%>');
            var ctrlN = document.getElementById('<%=rdoNoAddDriver.ClientID%>');
            var valCtrl = document.getElementById('<%=rfvAddDriver.ClientID%>');
            var ddlDrvCount = document.getElementById('<%=ddlDriverCount.ClientID%>');
            var divAddDriver = document.getElementById('<%=divAddDriver.ClientID%>');

            if (ctrlY.checked == true || ctrlN.checked == true) {
                ctrlTxt.value = '1';
                valCtrl.style.visibility = 'hidden';
            }
            else {
                ctrlTxt.value = '';
            }

            if (ctrlY.checked == true) {
                if (ddlDrvCount != null) {
                    ddlDrvCount.disabled = false;
                    //showhideDriver();
                }
                if (divAddDriver != null) divAddDriver.style.display = '';
            }
            else {
                //ddlDrvCount.options(0).selected = true;
                if (ddlDrvCount != null) {
                    ddlDrvCount.selectedIndex = 0;
                    ddlDrvCount.disabled = true;
                    //showhideDriver();
                }
                if (divAddDriver != null) divAddDriver.style.display = 'none';
            }
        }

        function CheckInsuranceType() {
            var ddlInsuranceType = document.getElementById("<%=ddlInsuranceType.ClientID%>");
            var divSumInsured = document.getElementById("divSumInsured");
            if (ddlInsuranceType.value >= 20) {
                divSumInsured.style.display = 'none';
            }
            else {
                divSumInsured.style.display = '';
            }
        }

        function ShowHideAll() {
            try {
                CheckInsuranceType();
            }
            catch (ex) {
                alert(ex.name + ' ' + ex.message);
            }
        }

        OnOffUpdateProgress(false);

        function ShowPopupMsg() {
            var modpop = $find("mdlPopupAlertMessage");
            if (!modpop) { return; }
            modpop.show()
        }

        function HidePopupMsg() {
            var modpop = $find("mdlPopupAlertMessage");

            if (!modpop) { return; }
            modpop.hide()
        }
        function ShowPopupMsgCall() {
            var modpop = $find("behCallMepop");
            if (!modpop) { return; }
            modpop.show();
            return false;
        }

        function HidePopupMsgCall() {
            var modpop = $find("behCallMepop");

            if (!modpop) { return; }
            modpop.hide();
            return false;
        }

        function ShowHidePopupPanel(OnOff) {
            if (OnOff == true) {
                document.getElementById('<%=pnlPopupAlert.ClientID%>').style.display = 'none';
            }
            else {
                document.getElementById('<%=pnlPopupAlert.ClientID%>').style.display = '';
            }
        }

        function SetResultToCompare(sender, name, valBtnId) {
            var oldStr = document.getElementById('<%=hidStrResultCompare.ClientID%>').value;
            var oldButt = document.getElementById('hidBtnCompareId').value;
            var oldLabel = document.getElementById('hidLblChkCompare').value;
            var newLbl = valBtnId.replace('btnCompare', 'spnChkCompare');


            // sender.innerText = 'fff';
            if (name != '') {
                if ((',' + oldStr).indexOf(name) < 0 && oldStr.split(",").length >= 4) {
                    alert('<%= GetGlobalResourceObject("CarInsuranceResultPage","Compare4Items") %>');
                    sender.checked = false;
                    return;
                }
                if (('x' + oldStr).indexOf(name) != -1) {
                    var oldButtSplit = oldButt.split(",");
                    var olLabelSplit = oldLabel.split(",");
                    if (oldButtSplit.length > 2)
                        document.getElementById(valBtnId).style.display = 'none';
                    else if (oldButtSplit.length == 2) {
                        document.getElementById(oldButtSplit[0]).style.display = 'none';
                        document.getElementById(oldButtSplit[1]).style.display = 'none';
                        document.getElementById(olLabelSplit[0]).style.display = '';
                        document.getElementById(olLabelSplit[1]).style.display = '';
                    }
                    if (oldStr.indexOf(',' + name) != -1) {
                        oldStr = oldStr.replace(',' + name, '');
                        oldButt = oldButt.replace(',' + valBtnId, '');
                        oldLabel = oldLabel.replace(',' + newLbl, '');
                    }
                    else if (oldStr.indexOf(name + ',') != -1) {
                        oldStr = oldStr.replace(name + ',', '');
                        oldButt = oldButt.replace(valBtnId + ',', '');
                        oldLabel = oldLabel.replace(newLbl + ',', '');
                    }
                    else {
                        oldStr = '';
                        oldButt = '';
                        oldLabel = '';
                    }
                    document.getElementById(newLbl).style.display = '';
                }
                else {
                    if (oldButt != '')
                        oldButt = oldButt + "," + valBtnId;
                    else
                        oldButt = valBtnId;

                    if (oldStr != '')
                        oldStr = oldStr + "," + name;
                    else
                        oldStr = name;

                    if (oldLabel != '') {
                        oldLabel = oldLabel + "," + newLbl;
                        document.getElementById(newLbl).style.display = 'none';
                    }
                    else
                        oldLabel = newLbl;
                }
                document.getElementById('<%=hidStrResultCompare.ClientID%>').value = oldStr;
                document.getElementById('hidBtnCompareId').value = oldButt;
                document.getElementById('hidLblChkCompare').value = oldLabel;
                ShowCompareButton();
            }
        }

        function ShowCompareButton() {
            var btnCId = document.getElementById('hidBtnCompareId').value.split(",");
            var labelSplit = document.getElementById('hidLblChkCompare').value.split(",");
            if (btnCId.length > 1) {
                for (var i = 0; i < btnCId.length; i++) {
                    document.getElementById(btnCId[i]).style.display = '';
                    document.getElementById(labelSplit[i]).style.display = 'none';
                }
            }
        }
        function ClearChkCompareHid() {

            document.getElementById('<%=hidStrResultCompare.ClientID%>').value = '';
            document.getElementById('hidBtnCompareId').value = '';
            document.getElementById('hidLblChkCompare').value = '';
        }

        function CheckAddDriverChange() {
            alert(document.getElementById('<%=divAddDriver.ClientID%>').visible);
            if (document.getElementById('<%=rdoYesAddDriver.ClientID%>').checkd == true) {
                document.getElementById('<%=rdoNoAddDriver.ClientID%>').checkd = false;
                document.getElementById('<%=txtAddDriver.ClientID%>').value = '1';
                document.getElementById('<%=pnlDriver.ClientID%>').style.display = '';
                document.getElementById('<%=divAddDriver.ClientID%>').style.display = '';
                $("#<%=ddlDriverCount.ClientID%>").val('1');
                document.getElementById('<%=divDriver1.ClientID%>').style.display = '';

            }
            else {
                alert('ddd2');
                if (document.getElementById('<%=rdoNoAddDriver.ClientID%>').checkd) {
                    document.getElementById('<%=rdoYesAddDriver.ClientID%>').checkd = false;
                    document.getElementById('<%=txtAddDriver.ClientID%>').value = '1';
                    document.getElementById('<%=pnlDriver.ClientID%>').style.display = 'none';
                    document.getElementById('<%=divAddDriver.ClientID%>').style.display = 'none';

                }

            }
        }

        /* ]]> */
    </script>

    <%--<script src="/includes/carinsurance/results.js" type="text/javascript"></script>--%>
    <!--END FREEZE PANE-->
    <!-- Google Code for Results Page TH Conversion Page -->

    <script type="text/javascript">
        /* <![CDATA[ */
        var google_conversion_id = 1013678288;
        var google_conversion_language = '<%= GetGlobalResourceObject("AdWords","language")%>';
        var google_conversion_format = "3";
        var google_conversion_color = "ffffff";
        var google_conversion_label = '<%= GetGlobalResourceObject("AdWords","google_conversion_label")%>';
        var google_conversion_value = 0;
        var google_remarketing_only = false;
        /* ]]> */
    </script>

    <script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
    </script>

    <noscript>
        <div style="display: inline;">
            <img height="1" width="1" style="border-style: none;" alt="" src="<%=GetGlobalResourceObject ("AdWords","source" )%>" />
        </div>
    </noscript>
</asp:Content>
